{#代码片段库#}

{% macro oneMenu(title, ico, url, tag) %}
<li class="has-sub {% if tag == app.request.get('menu_tag') %}active{% endif %}">
    <a href="{{ url }}" class="">
        <span class="icon-box"> <i class="{{ ico }}"></i></span> {{ title }}
    </a>
</li>
{% endmacro %}

{% macro twoMenu(title, ico, items) %}
<li class="has-sub {% for value in items %} {% if value.tag == app.request.get('menu_tag') %}active{% endif %} {% endfor %}">
    <a href="javascript:;" class="">
        <span class="icon-box"> <i class="{{ ico }}"></i></span> {{ title }}
        <span class="arrow"></span>
    </a>
    <ul class="sub">
        {% for  value in  items  %}
            <li class="{% if value.tag == app.request.get('menu_tag') %}active{% endif %}"><a class="" href="{{ value.url }}">{{ value.title }}</a></li>
        {% endfor %}
    </ul>
</li>
{% endmacro %}

{#{% macro threeMenu(title, ico, items) %}#}
    {#<li class="has-sub ">#}
        {#<a href="javascript:;" class="">#}
            {#<span class="icon-box"> <i class="{{ ico }}"></i></span> {{ title }}#}
            {#<span class="arrow"></span>#}
        {#</a>#}
        {#<ul class="sub">#}
            {#{% for key,value in items%}#}
                {#<li>#}
                    {#<a href="javascript:;" class="">#}
                        {#<span class="icon-box"> <i class=""></i></span> {{ value.title }}#}
                        {#<span class="arrow"></span>#}
                    {#</a>#}
                        {#<ur class="sub">#}
                            {#{% for  v in  value.items  %}#}
                                {#<li>#}
                                    {#<a class="" href="{{ v.url }}">#}
                                        {#{{ v.title }}#}
                                    {#</a>#}
                                {#</li>#}
                            {#{% endfor %}#}
                        {#</ur>#}
                {#</li>#}
            {#{% endfor %}#}
        {#</ul>#}
    {#</li>#}
{#{% endmacro %}#}

